﻿#include "FITKAbaAbstractSection.h"
#include "FITKAbaMaterial.h"
#include "FITK_Kernel/FITKCore/FITKDataRepo.h"
#include "FITK_Interface/FITKInterfacePhysics/FITKAbstractMaterial.h"

namespace Interface
{
    FITKAbaAbastractSection::~FITKAbaAbastractSection()
    {

    }

    bool FITKAbaAbastractSection::copy(FITKAbstractDataObject* obj)
    {
        FITKAbaAbastractSection* objSection = dynamic_cast<FITKAbaAbastractSection*>(obj);
        if (objSection == nullptr)
            return false;
        this->setDataObjectName(objSection->getDataObjectName());
        int num = objSection->getMaterialCount();
        for (int i = 0; i < num; ++i)
        {
            int mId = objSection->getMaterialID(i);
            this->setMaterial(mId, i);
        }
        return true;
    }

    QString FITKAbaAbastractSection::getTypeString()
    {
        return QString();
    }

    FITKAbaAbastractSection::FITKAbaSectionType Interface::FITKAbaAbastractSection::getSectionType()
    {
        return FITKAbaSectionType::None;
    }


    
}
